package com.example.ktdemo.httputils

import com.example.ktdemo.mvp.model.BaseModel
import com.example.ktdemo.mvp.model.DragonModel
import com.example.ktdemo.mvp.model.TestModel
import io.reactivex.rxjava3.core.Observable
import okhttp3.ResponseBody
import retrofit2.http.*

interface UserApi {
    @GET("index?type=top&key=2c1cb93f8c7430a754bc3ad62e0fac06")
    fun getTest():Observable<BaseModel<TestModel>>

    @FormUrlEncoded
    @POST("user/Inventory")
    fun takeDragon( @Field("id") id:String):Observable<ResponseBody>

    @GET("user/Inventory?page=1&limit=9999&page_name=%E5%A4%A7%E7%88%86(%E4%B8%AD)")
    fun getIndexDragon():Observable<DragonModel>
}